<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>选择结果</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/page/weixin/jweixin-1.0.0.js"></script>
</head>
<body>
您选择了【${nickname }】医生作为您的咨询医生。
<input id="checkJsApi" type="button" value="checkJsApi">
<script type="text/javascript">

wx.config({
    debug: true, 
    appId: '${appId}', 
    timestamp: ${timestamp}, 
    nonceStr: '${nonceStr}', 
    signature: '${signature}',
    jsApiList: ['closeWindow'] 
});

wx.ready(function(){

	// 1 判断当前版本是否支持指定 JS 接口，支持批量判断
	  document.querySelector('#checkJsApi').onclick = function () {
	    wx.checkJsApi({
	      jsApiList: [
	        'closeWindow'
	      ],
	      success: function (res) {
	        alert(JSON.stringify(res));
	      }
	    });
	  };
});

wx.closeWindow();

wx.error(function(res){

    alert(JSON.stringify(res));

});


</script>
</body>
</html>